import Vue from 'vue'
import Vuex from 'vuex'

Vue.use(Vuex);

export default new Vuex.Store({
  state: {
    routes: [],
    currentHr: JSON.parse(window.sessionStorage.getItem("currentHr"))
  },
  mutations: {
    initMenu(state, menus) {
      state.routes = menus;
    },
    initRoutes(state, data) {
      state.routes = data;
    },
    initCurrentHr(state, hr) {
      state.currentHr = hr;
    }
  }
});
